<!--Descriptive page name, messages and instructions-->
<h2><%=h "Create Account" %></h2>
<% if @user.errors.any? %>
  <div id="errorExplanationNone">
     <p><%= ts("Oops, there's some problems with the stuff you told us.") %></p>
     <ul>
       <% @user.errors.full_messages.each do |msg| %>
       <li><%= msg %></li>
       <% end %>
     </ul>
  </div>
<% end %>
<!--/descriptions-->

<!--main content-->
<!-- TODO add ajax -->
<%= form_for @user do |f| %>
  <%= hidden_field_tag :invitation_token, @user.invitation_token %>
  <fieldset><legend>User Details</legend>
  <% if params[:use_openid] && ArchiveConfig.USE_OPENID %>
    <p><%= link_to ts('Sign up using Password'), new_user_path(:invitation_token => @user.invitation_token) %></p>
    <%= render :partial => "openid", :locals => {:f => f} %>
  <%- else %>
    <% if ArchiveConfig.USE_OPENID %>
      <p><%= link_to ts('Sign up using OpenID'), new_user_path(:use_openid => true, :invitation_token => @user.invitation_token) %></p>
    <% end %>
    <%= render :partial => "passwd", :locals => {:f => f} %>
  <% end %>
  </fieldset>
  <fieldset><legend>Legal Agreements</legend>
  <%= render :partial => "legal", :locals => {:f => f} %>
  </fieldset>
  <fieldset><legend>Submit</legend>
  <!-- Buttons for "Cancel" and "Create Account" -->
  <p class="submit">
    <input type="submit" name="cancel_create_account" value="Cancel" />
    <%= submit_tag 'Create Account' %>
  </p>
  </fieldset>
<% end %>
<!--/content-->
